<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
/*        var arr = [];
        arr[0] = 12;
        arr[2] = "abc";

        for(var i = 0; i < arr.length; i++){
            alert(arr[i]);
        }*/

/*        function  fun(){
            alert( arguments.length );
            alert("无参函数fun()");
        }

        fun(1, "abc");*/

/*        function sum(num1, num2){
            var result = 0;
            for(var i = 0; i < arguments.length; i++){
                if(typeof(arguments[i]) == "number"){
                    result += arguments[i];
                }
            }
            return result;
        }

        alert( sum(1, 2, 3, "abc", 4, 5));*/

        var obj = new Object();
        // alert( obj );
        obj.name = "华泽";
        obj.age = 10;
        obj.fun = function(){
            alert( "姓名:" + this.name + ",年龄:" + this.age );
        }

        alert( obj.name);
        alert( obj.age);
        obj.fun();
    </script>
</head>
<body>

</body>
</html>